import * as React from 'react'
import classNames from 'classnames'
import { Icon } from '../'

import { ItemProps, ItemState } from './interface'

class TimelineItem extends React.Component<ItemProps, ItemState> {
  static defaultProps = {
    prefixCls: 'layui-timeline'
  }
  constructor(props: ItemProps) {
    super(props)
    this.state = {}
  }

  render() {

    const {
      prefixCls, children, className,
      title,
      ...restProps
    } = this.props

    const classes = classNames(`${prefixCls}-item`, className, {
      
    })

    return (
      <li className={classes}>
        <Icon className={`${prefixCls}-axis`}>&#xe63f;</Icon>
        <div className={`${prefixCls}-content layui-text`}>
          <h3 className={`${prefixCls}-title`}>{title}</h3>
          {children}
        </div>
      </li>
    )
  }
}

export default TimelineItem